package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class GranteeList {

    private int beginIndex;
    private int endIndex;
    private List<Grantee> granteeList;

    public GranteeList(List<Grantee> granteeList) {
        this.beginIndex = granteeList.get(0).getBeginIndex();
        this.endIndex = granteeList.get(granteeList.size() - 1).getEndIndex();
        this.granteeList = granteeList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return granteeList.size();
    }

    public Grantee get(int index) {
        return granteeList.get(index);
    }

}
